package com.aiit.service.impl;

import com.aiit.dao.HomeDao;
import com.aiit.pojo.bo.Task;
import com.aiit.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeServiceImpl implements HomeService {
    @Autowired
    private HomeDao homeDao;


    @Override
    public List<Task> selectTrueStatus(Long id) {
        return homeDao.selectTrueStatus(id);
    }

    @Override
    public List<Task> selectFalseStatus(Long id) {
        return homeDao.selectFalseStatus(id);
    }

    @Override
    public List<Task> searchTaskByHomeFinish(Long id) {
        return homeDao.searchTaskByHomeFinish(id);
    }

    @Override
    public List<Task> searchTaskByHomeUNFinish(Long id) {
        return homeDao.searchTaskByHomeUNFinish(id);
    }

    @Override
    public List<Task> searchTrueTaskByStatusandUser(String title, String create_time, String finish_time, Long id) {
        return homeDao.searchTrueTaskByStatusandUser(title, create_time, finish_time, id);
    }

    @Override
    public List<Task> searchFalseTaskByStatusandUser(String title, String create_time, String finish_time, Long id) {
        return homeDao.searchFalseTaskByStatusandUser(title, create_time, finish_time, id);
    }

    @Override
    public int updateTaskByStatus1(int id) {
        return homeDao.updateTaskByStatus1(id);
    }

    @Override
    public int updateTaskByStatus2(int id) {
        return homeDao.updateTaskByStatus2(id);
    }

    @Override
    public int modifyPassword(String newpwd,Long id) {
        return homeDao.modifyPassword(newpwd,id);
    }
}
